/*
 * @Author: wangjh wangjiahui0710@163.com
 * @Date: 2024-06-11 11:33:49
 * @LastEditors: wangjh wangjiahui0710@163.com
 * @LastEditTime: 2024-06-14 10:33:48
 * @FilePath: \cip-admin\eslint.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import antfu from "@antfu/eslint-config";
import SimpleImportSort from "eslint-plugin-simple-import-sort";

export default antfu(
	{
		unocss: true,
		// typescript: {
		//   tsconfigPath: 'tsconfig.json',
		// },
		formatters: {
			css: true,
			html: true,
			markdown: "prettier",
		},
	},
	{
		plugins: {
			"simple-import-sort": SimpleImportSort,
		},
		rules: {
			// import排序
			"import/default": "off",
			"import/export": "off",
			"import/order": "off",
			"sort-imports": "off",
			"import/no-duplicates": "warn", // 同一导入合并为一行
			"import/consistent-type-specifier-style": ["warn", "prefer-top-level"], // ts 类型单独一行
			"import/no-default-export": "off", // 必须命名导出
			"simple-import-sort/imports": "warn",
			"simple-import-sort/exports": "warn",
			"unused-imports/no-unused-imports": "warn", // 自动移除未使用导入
		},
	},
);
